package cn.tedu.blog.server.test;

import org.omg.CORBA_2_3.portable.InputStream;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class test1 {
    public static void main(String[] args) {
        File file = new File("https://laochengdu.oss-cn-chengdu.aliyuncs.com/exampledir/exampleobject.txt");
        try(FileInputStream fis = new FileInputStream(file);
            InputStreamReader isr = new InputStreamReader(fis, StandardCharsets.UTF_8);
            BufferedReader br = new BufferedReader(isr);

        ){
            String bf;
            while ((bf= br.readLine())!=null) {
                System.out.println("输出："+bf);
        }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
